<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <title>固定资产详情</title>
    <link rel="stylesheet" href="../../static/lib/layui/css/layui.css" media="all">
    <style>
        .kaige-body {
            padding: 0;
            background-color: #fff;
        }
    </style>
</head>

<body>
    <div class="kaige-body" id="propertyinfo_html"></div>
    <script src="../../static/lib/layui/layui.js"></script>
    <script>

        layui.use(['layer','laytpl'], function () {
            var 
                layer = layui.layer,
               
                laytpl = layui.laytpl,
               
                $ = layui.$;
            //获取地址栏参数
            function getQueryString(name) {
                var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
                var r = window.location.search.substr(1).match(reg);
                if (r != null) return unescape(r[2]); return '';
            }
            var id = getQueryString('id');

            $.ajax({
                url: '/qrcode/Erweima/propertyinfo',
                data: { id: id },
                type: 'GET',
                success: function (res) {
                    console.log(res);
                    var content = $("#kaige_zichaninfo_html_box").html();
                    laytpl(content).render(res, function (reshtml) {
                        $('#propertyinfo_html').empty().append(reshtml);
                    });
                }
            });
        });

    </script>
    <script type="text/html" id="kaige_zichaninfo_html_box">
        <form class="layui-form kaige-body-form" lay-filter="kaige_zichaninfo_form_lay_filter">
        <div class="layui-card-body">
            <table class="layui-table">
                <tbody>
                    <tr>
                        <td>资产名称</td>
                        <td>{{ d.property_name }} </td>
                    </tr>
                    <tr>
                        <td>资产编号</td>
                        <td>{{ d.property_serial_number }}</td>
                    </tr>
                    
    
                    <tr>
                        <td>规格</td>
                        <td>{{ d.size }}</td>
                        
                    </tr>
                    <tr>
                        <td>型号</td>
                        <td>{{ d.model }}</td>
                    </tr>
                    <tr>
                        <td>价格</td>
                        <td>{{ d.price }}</td>
                    </tr>
                    <tr>
                        <td>所属分类</td>
                        {{# layui.each(d.propertytypeList.data,function(index,item){ }}
                        {{# if(d.their_type ==item.id){ }}
                        <td>{{ item.name }}</td>
                        {{# } }}
                        {{# }) }}
                    </tr>
                    <tr>
                        <td>品牌</td>
                        {{# layui.each(d.sysdict.pinpai,function(index,item){ }}
                        {{# if(d.brand ==index){ }}
                        <td>{{ item }}</td>
                        {{# } }}
                        {{# }) }}
                    </tr>
                    <tr>
                        <td>资产来源</td>
                        {{# layui.each(d.sysdict.zichanlaiyuan,function(index,item){ }}
                        {{# if(d.facebook ==index){ }}
                        <td>{{ item }}</td>
                        {{# } }}
                        {{# }) }}
                    </tr>
                    <tr>
                        <td>状态</td>
                        {{# layui.each(d.sysdict.zichanzhuangtai,function(index,item){ }}
                        {{# if(d.status ==index){ }}
                        <td>{{ item }}</td>
                        {{# } }}
                        {{# }) }}
                    </tr>
                    <tr>
                        <td>所在位置</td>
                        <td>{{ d.cursor }}</td>
                    </tr>
                    <tr>
                        <td>购买日期</td>
                        <td>{{ layui.util.toDateString(d.buy_time*1000, 'yyyy-MM-dd HH:mm:ss') }}</td>
                    </tr>
                    
                </tbody>
            </table>
        </div>
    </form>
    </script>

</body>

</html>